package besta.moon.engine.store;

import besta.moon.MoonConnection;
import besta.moon.engine.Table;


public class MoonPageLink {

    public long filePos;
    public TableStorePage page;

    public MoonImpl getStore(Table table, MoonConnection con, int lock) throws Exception {
        TableStorePage page = this.page;
        if (page == null) {
            return table.getStore(con, filePos, lock);
        }
        while (page.nextLock != null) {
            page = page.nextLock;
        }
        return table.getStore(page, lock);
    }
}
